package com.example.demo.service;

import com.example.demo.entity.Menu;
import com.example.demo.exception.BusinessException;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpSession;
import java.util.List;


@Service
public interface MenuService {
    public Menu findById(Long id);
    public List<Menu> findAllMenu();

    public List<Menu> queryMenuList(Integer page,Integer limit);

    public List<?> findCatalogById(Long id);

    public void CreateCollection(String collection);

    /**
     * 删除菜品
     * @param id
     * @return 是否删除成功
     */
    public boolean deleteById(HttpSession session, Long id) throws BusinessException;

    public boolean offLoadById(HttpSession session, Long id) throws BusinessException;

    public boolean upLoadById(HttpSession session, Long id) throws BusinessException;

    //更新用户
    public Integer updateMenu(Menu menu);

    //删除用户
    public Integer deleteMenu(Long id);

    //添加菜品
    public Integer createMenu(Menu menu);
}
